// import { createRouter, createWebHistory } from 'vue-router'
import { createRouter, createWebHashHistory } from 'vue-router'
import Layout from '@/views/Layout.vue'
import Search from '@/views/search/Search.vue'
import Analysis from '@/views/analysis/Analysis.vue'
import Login from '@/views/login/Login.vue'
import Script from '@/views/script/Script.vue'
import AutoScript from '@/views/autoscript/AutoScript.vue'
const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      component: Layout,
      children: [
        {
          path: '',
          redirect: '/search'
        },
        {
          path: '/search',
          component: Search
        },
        {
          path: '/analysis',
          component: Analysis
        },
        {
          path: '/autoScript',
          component: AutoScript
        },
        {
          path: '/script',
          component: Script
        }
      ]
    },
    {
      path: '/login',
      component: Login
    }
  ]
})

export default router
